<!-- @author: Fengli -->
<!-- @date: 4/30/19 -->
<!-- @desc: 组件复用，消息提示框 -->
<template>
  <md-snackbar :md-active.sync="msg.showMsg" :md-duration="msg.duration" :md-position="msg.position">{{ msg.content }} </md-snackbar>
</template>

<script>
  export default {
    name: 'Message',
    data: () => ({
      msg: {/* 用于配置msg */
        showMsg: false,
        content: null,
        duration: 3000,
        position: 'center'
      }
    }),
    methods: {
      /**
       * 用于配置msg,option具体配置减data部分的msg
       * @param option
       */
      message (option) {
        this.msg = option
      }
    }
  }
</script>

<style scoped>

</style>
